package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwCodeType implements Serializable {

    /**
     * identifier field
     */
    private String codeType;

    /**
     * persistent field
     */
    private String codeTypeName;

    /**
     * nullable persistent field
     */
    private String remark;

    /**
     * full constructor
     */
    public PwCodeType(java.lang.String codeType, java.lang.String codeTypeName, java.lang.String remark) {
        this.codeType = codeType;
        this.codeTypeName = codeTypeName;
        this.remark = remark;
    }

    /**
     * default constructor
     */
    public PwCodeType() {
    }

    /**
     * minimal constructor
     */
    public PwCodeType(java.lang.String codeType, java.lang.String codeTypeName) {
        this.codeType = codeType;
        this.codeTypeName = codeTypeName;
    }

    public java.lang.String getCodeType() {
        return this.codeType;
    }

    public void setCodeType(java.lang.String codeType) {
        this.codeType = codeType;
    }

    public java.lang.String getCodeTypeName() {
        return this.codeTypeName;
    }

    public void setCodeTypeName(java.lang.String codeTypeName) {
        this.codeTypeName = codeTypeName;
    }

    public java.lang.String getRemark() {
        return this.remark;
    }

    public void setRemark(java.lang.String remark) {
        this.remark = remark;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("codeType", getCodeType())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwCodeType)) return false;
        PwCodeType castOther = (PwCodeType) other;
        return new EqualsBuilder()
                .append(this.getCodeType(), castOther.getCodeType())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getCodeType())
                .toHashCode();
    }

}
